package com.gitee.dgwcode.services;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gitee.dgwcode.bean.Employee;
import com.gitee.dgwcode.mapper.EmployeeDao;
import com.gitee.dgwcode.mapper.EmployeeMapper;

@Service
public class EmployeeService {
	
	@Autowired
	private EmployeeMapper employeeMapper;
	
	@Autowired
	EmployeeDao employeeDao;
	
	/*@Autowired
	private SqlSession sqlSession;*/
	
	public List<Employee> getEmps() {
		//List<Employee> selectOne = sqlSession.selectOne("com.gitee.dgwcode.mapper.EmployeeMapper.getEmps");
		//EmployeeMapper mapper = sqlSession.getMapper(EmployeeMapper.class);
		//List<Employee> emps = employeeDao.getEmps();
		return employeeMapper.getEmps();
	}

}
